

*Formatting options
global tabOptions "cells("mean(fmt(2)) b(star fmt(2) )" "sd(par fmt(2)) se(par fmt(2))") label collabels(none)"
set scheme plotplainblind 


use "$dataDir/dataset_fires_harvest_daily_weather", clear


	qui sum year 
	local yMin=r(min)
	local yMax=r(max)
	forvalues y=`yMin'(1)`yMax' {
			label var treatmentX`y' "`y'"
			}
			
			
	local depvar "shf"
	local indepvar "treatment"
	local cluslvl "id_mills"
		
	
	foreach vd in `depvar' {
		foreach vi in `indepvar'{
	reghdfe `vd' `vi'X2012 `vi'X2013 `vi'X2015 `vi'X2016 `vi'X2017 `vi'X2014 temp_celsius rain rain2 , abs( id_mills i.month#i.year) vce(cluster `cluslvl')

		coefplot, keep(`vi'X2012 `vi'X2013 `vi'X2014 `vi'X2015 `vi'X2016 `vi'X2017) vertical  yline(0, lcolor(black)) graphregion(color(white)) omitted order(`vi'X2012 `vi'X2013 `vi'X2014 `vi'X2015 `vi'X2016 `vi'X2017) ciopts(recast(rcap) color(sea)) recast(connected) color(sea) ytitle(Difference regulated and unregulated facilities, size(small))
		
			graph export "$mainDir/figures/Fig2_eventstudy_fires.pdf", as(pdf) replace

}
}

